package com.gxa.hualian.service.impl;


import com.gxa.hualian.mapper.UserMapper;
import com.gxa.hualian.pojo.User;
import com.gxa.hualian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author bill
 * @date 2021/10/18 10:35
 */
@Service("userService")
@Transactional(rollbackFor = {Throwable.class})
public class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;

    @Override
    public User getById(Long id) {
       return userMapper.selectById(id);
    }

    @Override
    public void deleteById(Long id){
        userMapper.deleteById(id);
        int i = 1/0;
    }

    @Override
    public List<User> getList(){
        return null;
    }
}
